// 班级管理
package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
	"tuowei.com/app/teacher/apis"
)

func init() {
	routerCheckRole = append(routerCheckRole, registerClassCheckRoleRouter)
	routerNoCheckRole = append(routerNoCheckRole, registerClassNoCheckRoleRouter)

}
func registerClassCheckRoleRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	v1.Use(authMiddleware.MiddlewareFunc())
	v1 = v1.Group("class")
	{
		classApi := apis.Class{}
		// 班级列表条件获取
		v1.GET("getCondition", classApi.GetCondition)
		// 班级列表
		v1.GET("getLists", classApi.GetLists)
		// 获取所有的班级
		v1.GET("getAllLists", classApi.GetAllLists)
		// 班级详情
		v1.GET("detail/:id", classApi.Detail)
		// 班级学生列表
		v1.GET("getClassStudents", classApi.GetClassStudents)
		// 把学生移除班级
		v1.POST("removeStudents", classApi.RemoveStudents)
	}
}

func registerClassNoCheckRoleRouter(v1 *gin.RouterGroup) {
	v1 = v1.Group("class")
	{
		//classApi := apis.Class{}
		//// 班级列表条件获取
		//v1.GET("getCondition", classApi.GetCondition)
	}
}
